/*
*    Phantom v2.0 GUI Automation Software
*    Copyright (C) 2009  John C. Van Arsdall (john@phantomtest.com)
*
*    This program is free software; you can redistribute it and/or modify
*    it under the terms of the GNU General Public License as published by
*    the Free Software Foundation; either version 2 of the License, or
*    (at your option) any later version.
*
*    This program is distributed in the hope that it will be useful,
*    but WITHOUT ANY WARRANTY; without even the implied warranty of
*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*    GNU General Public License for more details.
*
*    You should have received a copy of the GNU General Public License along
*    with this program; if not, write to the Free Software Foundation, Inc.,
*    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
*/
// FlowStruct.h: interface for the CFlowStruct class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_FLOWSTRUCT_H__1A5BB61E_7E01_4190_ADFD_A494A4406A71__INCLUDED_)
#define AFX_FLOWSTRUCT_H__1A5BB61E_7E01_4190_ADFD_A494A4406A71__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "ssi_tnode.h"
#include "ssi_scriptline.h"
#include "ssi_dataexception.h"

class CFlowStruct;
typedef TNodeTree<CFlowStruct> FlowTree;
typedef TNode<CFlowStruct> FlowNode;


class SSI_SCRIPTDLL_API CFlowStruct  
{
public:
	SSI_BOOL bInitialized;
	SSI_BOOL PopFlow(CFlowStruct& Ret);
	void PushFlow(CFlowStruct& aFlow);
	CFlowStruct(CFlowStruct &Other);
//	CFlowStruct* GetLastFlow();
//	void ClearLastFlow();
//	void SetLastFlow(CFlowStruct* Last);
  FlowTree Subs;
	SSI_BOOL bTryAgain;
	SSI_CHAR Type;
	SSI_BOOL bCond;
//  SSI_BOOL bInitialized;
  ScriptNode* checkLine;
	ScriptNode* endLine;
	ScriptNode* startLine;
  CDataException Exception;
	CFlowStruct();
  CFlowStruct& operator=(CFlowStruct &Other);
	virtual ~CFlowStruct();
private:
  
//  CFlowStruct* lastFlow;
};

#endif // !defined(AFX_FLOWSTRUCT_H__1A5BB61E_7E01_4190_ADFD_A494A4406A71__INCLUDED_)



